package cn.com.niit.service.impl;


import cn.com.niit.mapper.MenuMapper;
import cn.com.niit.pojo.Menu;
import cn.com.niit.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class MenuServiceImpl implements MenuService {

@Autowired
MenuMapper mapper;
    @Override
    public void addMenu(Menu menu) {
        mapper.addMenu(menu);
    }

    @Override
    public Menu findOne(int id) {
        return mapper.findOne(id);
    }

    @Override
    public List<Menu> findAllMenuByMerchantName(String merchant_name) {
        return mapper.findAllMenuByMerchantName(merchant_name);
    }

    @Override
    public List<Menu> search(Menu menu) {
        return mapper.search(menu);
    }

    @Override
    public void del(int id) {
        mapper.del(id);
    }

    @Override
    public void revise(Menu menu) {
        mapper.revise(menu);
    }
}
